package com.zspace.lwq.consumer.service.impl;

import com.zspace.lwq.consumer.service.OrderService;
import com.zspace.lwq.user.bean.UserAddress;
import com.zspace.lwq.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 1、将服务注册到注册中心
 *      1.引入dubbo依赖
 *      2.配置服务提供者
 *
 *
 * 2、消费者去注册中心订阅
 */
@Service
public class OrderServiceImpl implements OrderService {

    @Autowired
    private UserService userService;

    @Override
    public void initOrder(String userId) {
        System.out.println("userId:" + userId);
        List<UserAddress> userAddressList = userService.getUserAddressList(userId);
        System.out.println(userAddressList);

    }

}
